<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('think', function () {
    return 'hello,ThinkPHP5!';
});

Route::get('hello/:name', 'index/hello');

//带有参数的普通路由规则
//http://192.168.56.102/test/test/lajigao/26/nv
Route::get('test/test/:name/:age/:gender','index/test/test');



//自定义路由
//参数：访问url，对应的模块/控制器/方法
//⚠️：如果这里定义了路由来访问【模块/控制器/方法】，那么原来可以访问该【模块/控制器/方法】的URL将失效
Route::get('test','index/test/index');
//参数：访问的url，方法
Route::get('fun',function(){
	exit('自定义方法路由');
});

//定义资源路由
//参数：访问的url,实际访问的控制器名
//如：http://192.168.56.102/user/delete?id=12
//请求类型	生成路由规则	对应操作方法
// GET	user	index
// GET	user/create	create
// POST	user	save
// GET	user/:id	read
// GET	user/:id/edit	edit
// PUT	user/:id	update
// DELETE	blog/:id	delete
// Route::resource('user','index/User');//没什么鸟用

return [

];
